//
//  DXMLSkaterEventObject.h
//  DerbyStatter
//
//  Created by glenn andreas on 1/29/14.
//  Copyright (c) 2014 glenn andreas. All rights reserved.
//

#import "DXMLEventObject.h"

@class DXMLTeamObject;
@class DXMLPersonObject;
@class DXMLJamObject;
@class DXMLPeriodObject;
@interface DXMLSkaterEventObject : DXMLEventObject
@property (strong) DXMLTeamObject *team;
@property (strong) DXMLPersonObject *skater;
@property (readonly) NSString *skaterTeam;
@property (readonly) DXMLJamObject *jam;
@property (readonly) DXMLPeriodObject *period;
@end


@interface DXMLPassObject : DXMLSkaterEventObject
@property (assign) NSInteger number;
@property (assign) NSInteger score;
@property (assign) BOOL completed; // defaults to YES if not specified!
@end

@interface DXMLLeadObject : DXMLSkaterEventObject
@end

@interface DXMLLostLeadObject : DXMLSkaterEventObject
@end

@interface DXMLCallObject : DXMLSkaterEventObject
@end

@interface DXMLInjuryObject : DXMLSkaterEventObject
@end

@interface DXMLStarPassObject : DXMLSkaterEventObject
@end

extern NSString *DXMLLineUpPositionJammer;
extern NSString *DXMLLineUpPositionPivot;
extern NSString *DXMLLineUpPositionBlocker;

@interface DXMLLineUpObject : DXMLSkaterEventObject
@property (assign) BOOL startsInBox;
@property (strong) NSString *position;
@end


extern NSString *DXMLPenaltySeverityNone; // no pass/no penalty
extern NSString *DXMLPenaltySeverityMinor; // no pass/no penalty
extern NSString *DXMLPenaltySeverityMajor; // no pass/no penalty
extern NSString *DXMLPenaltySeverityExplusion; // no pass/no penalty

@interface DXMLPenaltyObject : DXMLSkaterEventObject
@property (strong) NSString *penalty; // the code
@property (strong) NSString *severity;
@property (assign) BOOL rescinded;
@end

// For dealing with entering/exiting box
@interface DXMLEnterBoxObject : DXMLSkaterEventObject
@property (assign) NSInteger pass; // pass number of opposite jammer
@property (assign) NSInteger duration; // in seconds
@end
@interface DXMLSubstitutionObject : DXMLSkaterEventObject
@property (readonly) DXMLPersonObject *originalSkater;
@end

// why was there a premature exit of the box
extern NSString *DXMLExitBoxPrematureOfficial;
extern NSString *DXMLExitBoxPrematureSkater;
extern NSString *DXMLExitBoxPrematureRescinded;
extern NSString *DXMLExitBoxPrematureMistake;

@interface DXMLExitBoxObject : DXMLSkaterEventObject
@property (assign) NSInteger pass; // pass number of opposite jammer
@property (assign) NSInteger duration; // in seconds
@property (strong) NSString *premature;
@property (assign) BOOL noSkater;
@end